package com.mid;

/**
 * Created by Lxk on 2019/5/26.
 */
public class Solution201 {

    public int rangeBitwiseAnd(int m, int n) {
        int res = 0x7fffffff;
        for(int i = m ;i <= n; i++){
            if(m==0){
                return 0;
            }
            res = res&i;
        }
        return res;
    }





    public static void main(String[] args) {
        Solution201 solution201 = new Solution201();
        System.out.println(solution201.rangeBitwiseAnd(5,7));
    }

}
